<?php

class m131006_125847_create_table_product_category extends CDbMigration
{
	public function up()
	{
            $this->execute("
                RENAME TABLE  `menu` TO  `product_category` ;
                ALTER TABLE  `product_category` ADD  `thumbanilId` INT NOT NULL AFTER  `name`;
                ALTER TABLE  `product` CHANGE  `menuId`  `categoryId` INT( 11 ) NOT NULL
            ");
	}

	public function down()
	{
		echo "m131006_125847_create_table_product_category does not support migration down.\n";
		return false;
	}

	/*
	// Use safeUp/safeDown to do migration with transaction
	public function safeUp()
	{
	}

	public function safeDown()
	{
	}
	*/
}